﻿<%@ Page Language="C#" MasterPageFile="~/Student/StuMasterPage.master" AutoEventWireup="true" CodeFile="Exam.aspx.cs" Inherits="Student_Default2" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentBody" Runat="Server">

<style type="text/css">
/*#examItem{
    width:450px; 
    height:450px;
}
#left{
    float:left;
    width:250px;
    height:450px;
    background:blue;
    color:#fff;
}
#right{
    float:left;
    width:200px;
    height:450px;
    background:#fc0;
}*/
#examItem{
    width:340px; 
    height:200px;
    padding:10px 0 0 10px;
    background:url(../Image/选择考试背景.gif) no-repeat;
}
#examItem:hover{
    background:url(../Image/选择考试背景_over.gif) no-repeat;
}
#item{
    margin:10px 10px;
}
</style>

<form runat="server">
    <asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource2" RepeatColumns="2" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="0px" CellPadding="4">
        <ItemTemplate>
            <div id="examItem" style="">
                <div id="item">
                    <p>名称:
                    <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>'></asp:Label>
                    </p>
                    <p>课程:
                    <asp:Label ID="courseNameLabel" runat="server" Text='<%# Eval("courseName") %>'></asp:Label><br />
                    </p>
                    <p>日期:
                    <asp:Label ID="dateLabel" runat="server" Text='<%# Eval("date") %>'></asp:Label><br />
                    </p>
                    <p>老师:
                    <asp:Label ID="teacherNameLabel" runat="server" Text='<%# Eval("teacherName") %>'></asp:Label><br />
                    </p>
                    <p>时间:
                    <asp:Label ID="finishedMinutesLabel" runat="server" Text='<%# Eval("finishedMinutes")+"分钟" %>'></asp:Label>
                    </p>
                    <p>总分:
                    <asp:Label ID="totalScoreLabel" runat="server" Text='<%# Eval("totalScore")+"分" %>'></asp:Label>
                    </p>
                    <asp:HyperLink ImageUrl="~/Image/开始考试.gif" NavigateUrl='<%# "Examing.aspx?id="+ Eval("id")+"&name="+ Eval("name")%>' runat="server"/>
                    <br />
                </div>
            </div>
        </ItemTemplate>
        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
        <ItemStyle BackColor="White" ForeColor="#003399" />
        <SelectedItemStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
    </asp:DataList><asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:onlineexamConnectionString %>"
        SelectCommand="SELECT t_paper.id, t_paper.name, t_course.name AS courseName, t_paper.date, t_teacher.name AS teacherName, t_paper.finishedMinutes, t_paper.totalScore FROM t_paper INNER JOIN t_teacher ON t_paper.teacherId = t_teacher.id INNER JOIN t_course ON t_paper.courseId = t_course.id AND t_teacher.courseId = t_course.id">
    </asp:SqlDataSource>
    <br />
</form>
</asp:Content>

